package com.dubious.interview.hashtable;

public class EqualsAndHashCodeMock
{
    private int equalsValue;
    private int hashCode;

    public EqualsAndHashCodeMock(int equalsValue, int hashCode)
    {
        this.equalsValue = equalsValue;
        this.hashCode = hashCode;
    }
    
    @Override
    public boolean equals(Object other)
    {
        if(other == null || !(other instanceof EqualsAndHashCodeMock))
        {
            return false;
        }
        
        return ((EqualsAndHashCodeMock)other).equalsValue == this.equalsValue;
    }
    
    @Override
    public int hashCode()
    {
        return hashCode; 
    }
    
    @Override
    public String toString()
    {
        return "equalsValue: " + equalsValue + ", hashCode: " + hashCode;
    }
}